<h3>ESTACI&Oacute;N 2: Pulido</h3>

<?php 
    echo $this->Form->create('ServiceOrderRow', array('action' => 'inspeccion_inicial'));
    echo $this->Form->input('id', array('type' => 'hidden'));    
    $tipos = array('A' => 'A', 'B'=>'B', 'C'=>'C', 'D'=>'D', 'F'=>'F', 'G'=>'G'); 
    echo $this->Form->create('ServiceOrderRow'); 
    echo $this->Form->input('service_order_id',  array('type' => 'hidden'));
    //Cambia a estado: embandado
    echo $this->Form->input('estado_cod',  array('type' => 'hidden', 'value' => '5'));

?>

<table  class="table table-striped">
	<tr>
		<td class="title">Pulido: </td>
		<td class="text"><?php echo $this->Form->radio('pulido',array( 2 =>'   SI ',1 =>'   NO ',), array('empty' => false, 'label' => false, 'legend' => false)); ?></td>
    </tr>
    <tr>
        <td class="title">Hora pulido: </td>
        <td class="text">
            <?php
                // $objDateTime = new DateTime('NOW');
                // echo $objDateTime->format('d-m-Y H:i:s'); 
                // $hora = $objDateTime->format('d-m-Y H:i:s'); 
                // echo $this->Form->hidden('pulido_hora',  array('value' => $hora));              
            ?> 
            <?php 
                if ($this->data['ServiceOrderRow']['pulido'] == 2) {
                    echo $this->data['ServiceOrderRow']['pulido_hora'];
                } else {
                    $objDateTime = new DateTime('NOW');
                    echo $objDateTime->format('d-m-Y H:i:s'); 
                    $hora = $objDateTime->format('d-m-Y H:i:s'); 
                    echo $this->Form->hidden('pulido_hora',  array('value' => $hora));                          
                }
            ?>
        </td>
    </tr>
    <tr>
        
        <td colspan="2" class="button"><?php echo $this->Form->end('Guardar'); ?></td>
    </tr>
</table>

